import 'package:flutter/material.dart';
import '../screens/system/fontsize_provider.dart';
import 'package:provider/provider.dart';

class TaskListItem extends StatelessWidget {
  final IconData? icon;
  final String label;
  final String value;
  final Color? valueColor;
  

  const TaskListItem({
    super.key,
    this.icon,
    required this.label,
    required this.value,
    this.valueColor,
  });

  @override
  Widget build(BuildContext context) {
    var fontScale = Provider.of<FontSizeProvider>(context).fontScale;
    return Padding(
      padding: const EdgeInsets.symmetric(vertical: 4,horizontal: 0),
      child: Row(
        children: [
          // Icon(icon, size: 24, color: Colors.grey),
          // const SizedBox(width: 50),
          SizedBox(
            width: 180,
            child: Text(
              '$label ',
              style: TextStyle(
                fontWeight: FontWeight.bold,
                fontSize: 13 * fontScale
              ),
            ),
          ),
          SizedBox(
            child: Text(
              value,
              style: TextStyle(
                fontWeight: FontWeight.bold,
                color: valueColor,
                fontSize: 12 * fontScale
              ),
            ),
          ),
          
        ],
      ),
    );
  }
}